<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>实时刷新当前时间</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="refresh" content="1">

  </head>
  
  <body>
      <%
        Date time =  new Date();
        int year = time.getYear();
        int month = time.getMonth();
        int day = time.getDay();
        int hour = time.getHours();
        int min=time.getMinutes();
        int second = time.getSeconds();
      %>
     <h2>当前时间是： <%=year%>-<%=month%>-<%=day%> <%=hour%>:<%=min%>:<%=second%></h2>
  </body>
</html>